package com.yonyou.brigade.ybz.model;

import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.List;

/**
 * 转换平台注册实体
 *
 * @author kangfw5@yonyou.com
 * @since 2018-08-14
 */
@TableName("cnv_entity")
public class CnvEntity extends Model<CnvEntity> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;
    /**
     * 显示名称
     */
    private String displayName;
    /**
     * 实体标识
     */
    private String entityName;
    private Date ts;

    @TableField(exist = false)
    private List<CnvAttribute> attributes;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getEntityName() {
        return entityName;
    }

    public void setEntityName(String entityName) {
        this.entityName = entityName;
    }

    public List<CnvAttribute> getAttributes() {
        return attributes;
    }

    public void setAttributes(List<CnvAttribute> attributes) {
        this.attributes = attributes;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public static final String ID = "id";

    public static final String DISPLAYNAME = "displayName";

    public static final String ENTITYNAME = "entityName";

    public static final String TS = "ts";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CnvEntity{" +
                "id=" + id +
                ", displayName=" + displayName +
                ", entityName=" + entityName +
                ", ts=" + ts +
                "}";
    }
}
